/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Vistas;

import com.toedter.calendar.JDateChooser;
import java.awt.event.ActionListener;
import java.util.Date;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JTable;

public class VFeriados extends javax.swing.JFrame {

    private Date dchFechtxt;
    /**
     * Creates new form VFeriados
     */
    public VFeriados() {
        super();
        initComponents();
       
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jLabel2 = new javax.swing.JLabel();
        dchFecha = new com.toedter.calendar.JDateChooser();
        btnNuevo = new javax.swing.JButton();
        btnEliminarDF = new javax.swing.JButton();
        btnSalirDF = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tabDias = new javax.swing.JTable();
        btnCancelar = new javax.swing.JButton();
        btnBuscar = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        btnActualizar = new javax.swing.JButton();
        btnGuardarDF = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Dias Feriados");
        setUndecorated(true);
        setResizable(false);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel2.setText("Seleccionar dia Feriado:");
        getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 40, -1, -1));
        getContentPane().add(dchFecha, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 60, 220, -1));

        btnNuevo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/appbar.clipboard.paper.png"))); // NOI18N
        btnNuevo.setToolTipText("Guardar");
        btnNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevoActionPerformed(evt);
            }
        });
        getContentPane().add(btnNuevo, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 110, 60, 50));

        btnEliminarDF.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/appbar.delete.png"))); // NOI18N
        btnEliminarDF.setToolTipText("Eliminar");
        btnEliminarDF.setEnabled(false);
        getContentPane().add(btnEliminarDF, new org.netbeans.lib.awtextra.AbsoluteConstraints(205, 110, 60, 50));

        btnSalirDF.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/exit.png"))); // NOI18N
        btnSalirDF.setToolTipText("Salir");
        getContentPane().add(btnSalirDF, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 110, 60, 50));

        tabDias.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null},
                {null}
            },
            new String [] {
                "Dias feriados"
            }
        ));
        jScrollPane1.setViewportView(tabDias);

        getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 170, 430, 180));

        btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/cancel.png"))); // NOI18N
        btnCancelar.setToolTipText("Cancelar");
        getContentPane().add(btnCancelar, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 110, 60, 50));

        btnBuscar.setText("Buscar");
        btnBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarActionPerformed(evt);
            }
        });
        getContentPane().add(btnBuscar, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 60, -1, -1));

        jLabel1.setFont(new java.awt.Font("Dialog", 1, 18)); // NOI18N
        jLabel1.setText("DIAS FERIADOS");
        getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 10, -1, -1));

        btnActualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/modif.png"))); // NOI18N
        btnActualizar.setToolTipText("Actualizar");
        btnActualizar.setEnabled(false);
        getContentPane().add(btnActualizar, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 110, 60, 50));

        btnGuardarDF.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/appbar.save.png"))); // NOI18N
        btnGuardarDF.setToolTipText("Guardar");
        btnGuardarDF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarDFActionPerformed(evt);
            }
        });
        getContentPane().add(btnGuardarDF, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 110, 60, 50));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnNuevoActionPerformed

    private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnBuscarActionPerformed

    private void btnGuardarDFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarDFActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnGuardarDFActionPerformed

    public JButton getBtnCancelar() {
        return btnCancelar;
    }

    public JButton getBtnEliminarDF() {
        return btnEliminarDF;
    }

    public JButton getBtnGuardarDF() {
        return btnGuardarDF;
    }

    public JButton getBtnNuevo() {
        return btnNuevo;
    }

    public JButton getBtnSalirDF() {
        return btnSalirDF;
    }
    public JButton getBtnActualizar() {
        return btnActualizar;
    }

    public JButton getBtnBuscar() {
        return btnBuscar;
    }

    public JDateChooser getDchFecha() {
        return dchFecha;
    }

  
    public JTable getTabDias() {
        return tabDias;
    }

    public void agregarListener(ActionListener accion){

        this.getBtnEliminarDF().addActionListener(accion);
        this.getBtnGuardarDF().addActionListener(accion);
        this.getBtnNuevo().addActionListener(accion);
        this.getBtnSalirDF().addActionListener(accion);
        this.getBtnActualizar().addActionListener(accion);
        this.getBtnBuscar().addActionListener(accion);
        this.getBtnCancelar().addActionListener(accion);
        
   
    }
    
    
    
    public void mostrarMensaje(String mensaje) {
    JOptionPane.showMessageDialog(this, mensaje);
	}


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActualizar;
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnEliminarDF;
    private javax.swing.JButton btnGuardarDF;
    private javax.swing.JButton btnNuevo;
    private javax.swing.JButton btnSalirDF;
    private javax.swing.ButtonGroup buttonGroup1;
    private com.toedter.calendar.JDateChooser dchFecha;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable tabDias;
    // End of variables declaration//GEN-END:variables

    

}
